jQuery(document).ready(function() { 

	
	
	$.ajax({
		url : 'getStatusImplementation', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#estatusImplementation').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	$.ajax({
		url : 'getLinks', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#contenedorLinks').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	
	
	$.ajax({
		url : 'getCompletionDate', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	
	
	
	
	
    var1=$('#checkboxCQ').val();
     
    if(var1=='true'){ 
        $('#textCQ').removeClass('oculto'); 
        $('#submitCQ').addClass('oculto');
    //$("#checkboxCQ").addAttr("disabled");
    }else{
    //$("#St2checkboxCQ").removeAttr("disabled");
    }
 
    var2=$('#checkboxCD').val();

    if(var2=='true'){
        $('#textCD').removeClass('oculto');
        $('#submitCD').addClass('oculto');
    //$("#checkboxCD").addAttr("disabled");
    }else{
    //$("#St2checkboxCD").removeAttr('disabled');
    }
    
 
    var3=$('#checkboxCID').val();

    if(var3=='true'){
        $('#textCID').removeClass('oculto');
        $('#submitCID').addClass('oculto');
    //$("#checkboxCD").addAttr("disabled");
    }else{
    //$("#St2checkboxCD").removeAttr('disabled');
    }
    
   
});


function enable_cb() {
    alert('enable1');
    
    $("#St2checkboxCQ").attr("checked", "true");
    $("#checkboxCQ").attr("checked", "true");

    $("#FsubmitCheckbox1").click();
}


function enable_cb2() {
    alert('enable2');

    $("#St2checkboxCD").attr("checked", "true");
    //$("#St2checkboxCD").checked("true");
    $("#checkboxCD").attr("checked", "true");
    //$("#checkboxCD").checked("true");
    
    //    $("#St2checkboxCD").val("true");
    //    $("#checkboxCD").val("true");
    
    $("#FsubmitCheckbox1").click(); 
}


function enable_cb3(intoCheckCiel) { 
	$.ajax({
		url : 'enableCb3', // action to be perform
		dataType : 'html',
		data : {
			checkCielId : $("#St2checkboxCID").prop('checked'),
			dateCiel : $("#textCID").val(),
			datePickerCiel : $("#fecha5").val(),
			intoCheckCiel : intoCheckCiel
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
			
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
 
}

function change1(intoCheckCop){
	$.ajax({
		url : 'change1', // action to be perform
		dataType : 'html',
		data : {
			checkCop : $("#checkCop").prop('checked'),
			dateCop : $("#dateCop").val(),
			datepickerCop : $("#datepickerCop").val(),
			intoCheckCop : intoCheckCop
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
}

function change2(intoCheckContacts){
	$.ajax({
		url : 'change2', // action to be perform
		dataType : 'html',
		data : {
			checkContacts : $("#checkContacts").prop('checked'),
			dateContacts : $("#dateContacts").val(),
		    datePickerContacts : $("#fecha1").val(),
		    intoCheckContacts : intoCheckContacts	
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
}

function change3(intoCheckReporting){
	$.ajax({
		url : 'change3', // action to be perform
		dataType : 'html',
		data : {
			checkReporting : $("#checkReporting").prop('checked'),
			dateReporting : $("#dateReporting").val(),
			datePickerReporting : $("#fecha2").val(),
			intoCheckReporting : intoCheckReporting
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
}

function change4(intoCheckScopeService){
	$.ajax({
		url : 'change4', // action to be perform
		dataType : 'html',
		data : {
			checkScopeService : $("#checkScopeService").prop('checked'),
			dateScopeService : $("#dateScopeService").val(),
			datePickerScopeService : $("#fecha3").val(),
			intoCheckScopeService : intoCheckScopeService
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	
  
}

function change5(intoCheckConditions){
	$.ajax({
		url : 'change5', // action to be perform
		dataType : 'html',
		data : {
			checkConditions : $("#checkConditions").prop('checked'),
			dateConditions : $("#dateConditions").val(),
			datePickerConditions : $("#fecha4").val(),
			intoCheckConditions : intoCheckConditions
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	

}

function change6(intoCheckCielQM){
	
	$.ajax({
		url : 'change6', // action to be perform
		dataType : 'html',
		data : {
			checkCQM : $("#St2checkboxCQ").prop('checked'),
			dateCielQM : $("#textCQ").val(),
			datePickerCielQM : $("#fecha6").val(),
			intoCheckCielQM : intoCheckCielQM
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
   
}

function change7(intoCheckCC){
$.ajax({
	url : 'change7', // action to be perform
	dataType : 'html',
	data : {
		checkCC : $("#St2checkboxCD").prop('checked'),
		dateCC : $("#textCD").val(),
		datePickerCC : $("#fecha7").val(),
		intoCheckCC : intoCheckCC
	},
	success : function(html) {
		$('#dateBean').html(html); // set result.jsp output to leftDiv
	},
	error : function(xhr, ajaxOptions, thrownError) {
		alert('An error occurred! ' + thrownError);
	},
});

}

function change8(intoCheckdateWorking){
	$.ajax({
		url : 'change8', // action to be perform
		dataType : 'html',
		data : {
			checkWorking : $("#checkWorking").prop('checked'),
			dateWorking : $("#dateWorking").val(),
			datePickerdateWorking : $("#fecha8").val(),
			intoCheckdateWorking : intoCheckdateWorking
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
}


function change9(intoCheckdateSOP){
$.ajax({
	url : 'change9', // action to be perform
	dataType : 'html',
	data : {
		checkSOP : $("#checkSOP").prop('checked'),
		dateSOP : $("#dateSOP").val(),
		datePickerdateSOP : $("#fecha9").val(),
		intoCheckdateSOP : intoCheckdateSOP
	},
	success : function(html) {
		$('#dateBean').html(html); // set result.jsp output to leftDiv
	},
	error : function(xhr, ajaxOptions, thrownError) {
		alert('An error occurred! ' + thrownError);
	},
});

}



function change10(intoCheckdateKPI){
	$.ajax({
		url : 'change10', // action to be perform
		dataType : 'html',
		data : {
			checkKPI : $("#checkKPI").prop('checked'),
			dateKPI : $("#dateKPI").val(),
			datePickerdateKPI : $("#fecha10").val(),
			intoCheckdateKPI : intoCheckdateKPI
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	

}



function reloadmove()
{
	
    jQuery(".botonActualizar").css("background-image",  "url(imagenes/updatea.gif)");
}

function reloadout()
{
    jQuery(".botonActualizar").css("background-image",  "url(imagenes/update.gif)");
}

function cambiaValor()
{
    jQuery(".botonActualizar").removeClass("botonActualizar").addClass("botonActualizarA");
    refreshInfo();
    jQuery(".botonActualizarA").removeClass("botonActualizarA").addClass("botonActualizar");
}
function refreshInfo(value){
        if(value == ""){
        }else{
         $("#sbtRefreshInfo").click(); 
         $('#btnConfirm').attr('disabled', false);
        }

   
}



var guardaEstatusImple = function(){
	$.ajax({
		url : 'statusChangeImple', // action to be perform 
		type : 'POST',
		data : {
			status : $("#valueStatusImplementation").val()
		},
		dataType : 'html',
		success : function(html) {
			$('#estatusImplementation').html(html);
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
};

var agregarLink = function(){
	var link = $('#inputLink').val();
	var descrip = $('#inputDescription').val();
	var display = $('#inputDisplayName').val();
	alert(link+descrip+display);
	$.ajax({
		url : 'addLink', // action to be perform 
		type : 'POST',
		data : {
			link :link,
			description : descrip,
			displayName : display
		},
		dataType : 'html',
		success : function(html) {
			$('#contenedorLinks').html(html);
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
};
jQuery(document).ready(function() { 
	
	$.ajax({
		url : 'getStatusImplementation', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#estatusImplementation').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	$.ajax({
		url : 'getLinks', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#contenedorLinks').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	
	
	$.ajax({
		url : 'getCompletionDate', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	
	
	
	
	
    var1=$('#checkboxCQ').val();
     
    if(var1=='true'){ 
        $('#textCQ').removeClass('oculto'); 
        $('#submitCQ').addClass('oculto');
    //$("#checkboxCQ").addAttr("disabled");
    }else{
    //$("#St2checkboxCQ").removeAttr("disabled");
    }
 
    var2=$('#checkboxCD').val();

    if(var2=='true'){
        $('#textCD').removeClass('oculto');
        $('#submitCD').addClass('oculto');
    //$("#checkboxCD").addAttr("disabled");
    }else{
    //$("#St2checkboxCD").removeAttr('disabled');
    }
    
 
    var3=$('#checkboxCID').val();

    if(var3=='true'){
        $('#textCID').removeClass('oculto');
        $('#submitCID').addClass('oculto');
    //$("#checkboxCD").addAttr("disabled");
    }else{
    //$("#St2checkboxCD").removeAttr('disabled');
    }
    
   
});


function enable_cb() {
    alert('enable1');
    
    $("#St2checkboxCQ").attr("checked", "true");
    $("#checkboxCQ").attr("checked", "true");

    $("#FsubmitCheckbox1").click();
}


function enable_cb2() {
    alert('enable2');

    $("#St2checkboxCD").attr("checked", "true");
    //$("#St2checkboxCD").checked("true");
    $("#checkboxCD").attr("checked", "true");
    //$("#checkboxCD").checked("true");
    
    //    $("#St2checkboxCD").val("true");
    //    $("#checkboxCD").val("true");
    
    $("#FsubmitCheckbox1").click(); 
}





function change11(intoCheckdateBC){
	
	$.ajax({
		url : 'change11', // action to be perform
		dataType : 'html',
		data : {
			checkBC : $("#checkBC").prop('checked'),
			dateBC : $("#dateBC").val(),
			datePickerdateBC : $("#fecha11").val(),
			intoCheckdateBC : intoCheckdateBC
		
		},
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	

}

function reloadmove()
{
	
    jQuery(".botonActualizar").css("background-image",  "url(imagenes/updatea.gif)");
}

function reloadout()
{
    jQuery(".botonActualizar").css("background-image",  "url(imagenes/update.gif)");
}

function cambiaValor()
{
    jQuery(".botonActualizar").removeClass("botonActualizar").addClass("botonActualizarA")
    refreshInfo();
    jQuery(".botonActualizarA").removeClass("botonActualizarA").addClass("botonActualizar")
}
function refreshInfo(value){
        if(value == ""){
        }else{
         $("#sbtRefreshInfo").click(); 
         $('#btnConfirm').attr('disabled', false);
        }

   
}



var guardaEstatusImple = function(){
	$.ajax({
		url : 'statusChangeImple', // action to be perform 
		type : 'POST',
		data : {
			status : $("#valueStatusImplementation").val()
		},
		dataType : 'html',
		success : function(html) {
			$('#estatusImplementation').html(html);
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
};

//var agregarLink = function(){
//	var link = $('#inputLink').val();
//	var descrip = $('#inputDescription').val();
//	var display = $('#inputDisplayName').val();
//	alert(link+descrip+display);
//	$.ajax({
//		url : 'addLink', // action to be perform 
//		type : 'POST',
//		data : {
//			link :link,
//			description : descrip,
//			displayName : display
//		},
//		dataType : 'html',
//		success : function(html) {
//			$('#contenedorLinks').html(html);
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//};
jQuery(document).ready(function() { 
	
	$.ajax({
		url : 'getStatusImplementation', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#estatusImplementation').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	$.ajax({
		url : 'getLinks', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#contenedorLinks').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	
	
	$.ajax({
		url : 'getCompletionDate', // action to be perform
		dataType : 'html',
		success : function(html) {
			$('#dateBean').html(html); // set result.jsp output to leftDiv
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
	
	
	
	
	
	
    var1=$('#checkboxCQ').val();
     
    if(var1=='true'){ 
        $('#textCQ').removeClass('oculto'); 
        $('#submitCQ').addClass('oculto');
    //$("#checkboxCQ").addAttr("disabled");
    }else{
    //$("#St2checkboxCQ").removeAttr("disabled");
    }
 
    var2=$('#checkboxCD').val();

    if(var2=='true'){
        $('#textCD').removeClass('oculto');
        $('#submitCD').addClass('oculto');
    //$("#checkboxCD").addAttr("disabled");
    }else{
    //$("#St2checkboxCD").removeAttr('disabled');
    }
    
 
    var3=$('#checkboxCID').val();

    if(var3=='true'){
        $('#textCID').removeClass('oculto');
        $('#submitCID').addClass('oculto');
    //$("#checkboxCD").addAttr("disabled");
    }else{
    //$("#St2checkboxCD").removeAttr('disabled');
    }
    
   
});


function enable_cb() {
    alert('enable1');
    
    $("#St2checkboxCQ").attr("checked", "true");
    $("#checkboxCQ").attr("checked", "true");

    $("#FsubmitCheckbox1").click();
}


function enable_cb2() {
    alert('enable2');

    $("#St2checkboxCD").attr("checked", "true");
    //$("#St2checkboxCD").checked("true");
    $("#checkboxCD").attr("checked", "true");
    //$("#checkboxCD").checked("true");
    
    //    $("#St2checkboxCD").val("true");
    //    $("#checkboxCD").val("true");
    
    $("#FsubmitCheckbox1").click(); 
}


//function enable_cb3() { 
//	$.ajax({
//		url : 'enableCb3', // action to be perform
//		dataType : 'html',
//		data : {
//			checkCielId : $("#St2checkboxCID").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
// 
//}

//function change1(){
//	$.ajax({
//		url : 'change1', // action to be perform
//		dataType : 'html',
//		data : {
//			checkCop : $("#checkCop").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//	
//}

//function change2(){
//	$.ajax({
//		url : 'change2', // action to be perform
//		dataType : 'html',
//		data : {
//			checkContacts : $("#checkContacts").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//}

//function change3(){
//	$.ajax({
//		url : 'change3', // action to be perform
//		dataType : 'html',
//		data : {
//			checkReporting : $("#checkReporting").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//}

//function change4(){
//	$.ajax({
//		url : 'change4', // action to be perform
//		dataType : 'html',
//		data : {
//			checkScopeService : $("#checkScopeService").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//	
//	
//  
//}

//function change5(){
//	$.ajax({
//		url : 'change5', // action to be perform
//		dataType : 'html',
//		data : {
//			checkConditions : $("#checkConditions").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//	
//
//}
//
//function change6(){
//	
//	$.ajax({
//		url : 'change6', // action to be perform
//		dataType : 'html',
//		data : {
//			checkCQM : $("#St2checkboxCQ").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//   
//}
//
//function change7(){
//	$.ajax({
//		url : 'change7', // action to be perform
//		dataType : 'html',
//		data : {
//			checkCC : $("#St2checkboxCD").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//	
//  
//}
//
//function change8(){
//	
//	$.ajax({
//		url : 'change8', // action to be perform
//		dataType : 'html',
//		data : {
//			checkWorking : $("#checkWorking").prop('checked')
//		},
//		success : function(html) {
//			$('#dateBean').html(html); // set result.jsp output to leftDiv
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//	
//  
//}
//




function reloadmove()
{
	
    jQuery(".botonActualizar").css("background-image",  "url(imagenes/updatea.gif)");
}

function reloadout()
{
    jQuery(".botonActualizar").css("background-image",  "url(imagenes/update.gif)");
}

function cambiaValor()
{
    jQuery(".botonActualizar").removeClass("botonActualizar").addClass("botonActualizarA")
    refreshInfo();
    jQuery(".botonActualizarA").removeClass("botonActualizarA").addClass("botonActualizar")
}
function refreshInfo(value){
        if(value == ""){
        }else{
         $("#sbtRefreshInfo").click(); 
         $('#btnConfirm').attr('disabled', false);
        }

   
}



var guardaEstatusImple = function(){
	$.ajax({
		url : 'statusChangeImple', // action to be perform 
		type : 'POST',
		data : {
			status : $("#valueStatusImplementation").val()
		},
		dataType : 'html',
		success : function(html) {
			$('#estatusImplementation').html(html);
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
};

//var agregarLink = function(){
//	var link = $('#inputLink').val();
//	var descrip = $('#inputDescription').val();
//	var display = $('#inputDisplayName').val();
//	alert(link+descrip+display);
//	$.ajax({
//		url : 'addLink', // action to be perform 
//		type : 'POST',
//		data : {
//			link :link,
//			description : descrip,
//			displayName : display
//		},
//		dataType : 'html',
//		success : function(html) {
//			$('#contenedorLinks').html(html);
//		},
//		error : function(xhr, ajaxOptions, thrownError) {
//			alert('An error occurred! ' + thrownError);
//		},
//	});
//};

var notifyStatusImplementation = function() {

	$.ajax({
		url : 'notifyStatusImplementation', // action to be perform 
		type : 'POST',
		dataType : 'html',
		success : function(html) {
			alert("se ha realizado la notificacion");
		},
		error : function(xhr, ajaxOptions, thrownError) {
			alert('An error occurred! ' + thrownError);
		},
	});
};

